# Maintainer: Anatol Pomozov
# Contributor: László Várady <laszlo.varady93@gmail.com>

pkgname=rocksdb
pkgver=8.6.7
pkgrel=1
pkgdesc='Embedded key-value store for fast storage'
arch=(loong64 x86_64)
url="https://rocksdb.org/"
license=(GPL2 Apache)
depends=(bzip2 jemalloc lz4 snappy zlib zstd tbb liburing)
makedepends=(python)
source=(rocksdb-$pkgver.tar.gz::https://github.com/facebook/rocksdb/archive/v$pkgver.tar.gz)
sha256sums=('cdb2fc3c6a556f20591f564cb8e023e56828469aa3f76e1d9535c443ba1f0c1a')

build() {
  cd rocksdb-$pkgver
  PORTABLE=1 USE_RTTI=1 make shared_lib
}

check() {
  cd rocksdb-$pkgver
  # make check # fails due to https://github.com/facebook/rocksdb/issues/8974
}

package() {
  cd rocksdb-$pkgver
  make install-shared DESTDIR="$pkgdir" PREFIX=/usr
}
